#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
int* twoSum(int* numbers, int numbersLen, int target, int* returnSize) {
	static a[2];
	memset(a, 0, sizeof(a));
	*returnSize = 2;
	int i = 0;
	for (i = 0; i < numbersLen; i++) {
		int j = 0;
		for (j = i + 1; j < numbersLen; j++) {
			if (numbers[i] + numbers[j] == target) {
				a[0] = i;
				a[1] = j;
				return a;
			}
		}
	}
	*returnSize = 0;
	return NULL;
}
int main() {
	int numbers[] = { 3,2,4 };
	int target = 6;
	int numbersLen = sizeof(numbers) / sizeof(numbers[0]);
	int returnSize = 0;
	int* p = twoSum(numbers, numbersLen, target, &returnSize);
	for (int i = 0; i < returnSize; i++) {
		printf("%d ", *(p + i));
	}
	printf("\n%d", target);
	return 0;
}